package com.hbusa.cotroller.chapter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author Sandwich
 * @version 1.0
 * @date 2021/12/27-20:02
 */
@WebServlet("/jspServlet")
public class jspServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("utf-8");
        req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html;utf-8");

        String chapterId = req.getParameter("chapterId");
        String novelId = req.getParameter("novelId");

        req.getSession().setAttribute("chapterId1",chapterId);
        req.getSession().setAttribute("novelId1",novelId);

        resp.sendRedirect("admin/chapterModify.jsp");
    }
}
